// index.js
import {
  network
} from "../../utils/network.js"
// 获取应用实例
const app = getApp()

Page({
  onLoad: function (options) {
    var that = this;
    network.getMovieList({
      success: function (movies) {
        that.setData({
          movies: movies
        });
      }
    });
    network.getTVList({
      success: function (tvs) {
        that.setData({
          tvs: tvs
        });
      }
    });
    network.getShowList({
      success: function (shows) {
        that.setData({
          shows: shows
        });
      }
    });
  },

  // data: {
  //   comments: [{
  //       user: {
  //         avatar: "https://img.3dmgame.com/uploads/images/news/20210622/1624350523_246218.jpg",
  //         name: "电影1"
  //       },
  //       rating: {
  //         value: 6.3
  //       },
  //       create_time: "2022-6-9 09:22:52",
  //       comment: "这个电影太好看了"
  //     },
  //     {
  //       user: {
  //         avatar: "https://img.3dmgame.com/uploads/images/news/20210622/1624350523_246218.jpg",
  //         name: "电影2"
  //       },
  //       rating: {
  //         value: 6.3
  //       },
  //       create_time: "2022-6-9 09:22:52",
  //       comment: "这个电影太好看了"
  //     }
  //   ],
  //   movies: [{
  //       cover: {
  //         url: "https://img.3dmgame.com/uploads/images/news/20210622/1624350523_246218.jpg"
  //       },
  //       rating: {
  //         value: 6.7
  //       },
  //       title: "电影1"
  //     },
  //     {
  //       cover: {
  //         url: "https://img.zcool.cn/community/01a7ef5e626f0fa8012165183e41aa.jpg"
  //       },
  //       rating: {
  //         value: 6.7
  //       },
  //       title: "电影2"
  //     },
  //     {
  //       cover: {
  //         url: "http://img.sccnn.com/bimg/337/39549.jpg"
  //       },
  //       rating: {
  //         value: 6.7
  //       },
  //       title: "电影3"
  //     },
  //   ],
  //   item: {
  //     cover: {
  //       url: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fp0.itc.cn%2Fq_70%2Fimages01%2F20210604%2F9d4a3898c1b84008b224d659ef6634f2.jpeg&refer=http%3A%2F%2Fp0.itc.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1657273009&t=633fca81e114a7da0deb5c9f6df41d4d"
  //     },
  //     rating: {
  //       value: 6.7
  //     },
  //     title: "向往的生活"
  //   }
  // }
})